<extend name="Public:index" />
<block name="main-crumb">
  <li class="active">变量增加</li>
</block>
<block name="mycss">
  <style>
    .form-control{
      width:80%;
      display: "";
  }
 </style>
</block>

<block name="main-content">
  <div class="container-fluid">
    <div class="row">
      <div class="col-12">
        <div class="card">
          <div class="card-body">
            <form id="add_form" name="add_form" action="{:U(\'cpn_add\')}" method="post">
              <table class="table table-bordered mb-0 table-centered">
                <tr>
                  <td width="10%" class="tableleft">变量名称：</td>
                  <td>
                    <input type="text" name="data[param_name]" id="param_name" class="form-control" />
                  </td>
                </tr>
                <tr>
                  <td class="tableleft">变量ID：</td>
                  <td>
                    0x<input type="text" name="data[var_name]" id="var_name" class="form-control" />

                  </td>
                </tr>
                <tr>
                  <td class="tableleft">变量单位：</td>
                  <td>
                    <input type="text" name="data[unit]" id="unit" class="form-control" />

                  </td>
                </tr>

                <tr>
                  <td class="tableleft">变量值类型：</td>
                  <td>
                    <select id="value_type" name="data[value_type]" class="form-control">
                      <option value="">请选择</option>
                      <option value="0">整形</option>
                      <option value="6">浮点形</option>
                    </select>
                  </td>
                </tr>
                <tr>
                  <td class="tableleft">变量类型：</td>
                  <td>
                    <select id="var_type" name="data[var_type]" class="form-control">
                      <option value="">请选择</option>
                      <volist name="cpn_class" id="r">
                        <option value="{$r[class_id]}">{$r[class_name]}</option>
                      </volist>
                    </select>
                  </td>
                </tr>
                <tr>
                  <td class="tableleft">APP名称：</td>
                  <td>
                    <input type="text" name="data[app_name]" id="app_name" class="form-control" />
                  </td>
                </tr>
                <tr>
                  <td class="tableleft">单元类型：</td>
                  <td>
                    <select id="cpn_type" name="data[cpn_type]" class="form-control">
                      <option value="">请选择</option>
                      <volist name="cpn_class" id="r">
                        <option value="{$r[class_id]}">{$r[class_name]}</option>
                      </volist>
                    </select>
                  </td>
                </tr>
                <tr>
                  <td colspan="3">
                    <input type="hidden" name="tijiao" id="tijiao" />
                    <input type="submit" class="btn btn-primary waves-effect" id="sub" name="sub" value="保存" />&nbsp;&nbsp;&nbsp;&nbsp;
                    <input type="reset" class="btn btn-success" value="清空" />
                  </td>
                </tr>

              </table>
            </form>
          </div>
        </div>
      </div>
    </div>
  </div>
</block>
<block name="myscript">
  <script src="__PUBLIC__/web/js/common.js"></script>
</block>